package com.cratos.xxgram.platf.presetsecret;

import javax.persistence.Column;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;

import org.redkale.convert.json.JsonConvert;
import org.redkale.util.Comment;

import com.cratos.xxgram.platf.friend.FriendShip;

/**
 *
 * @author fk
 */
@Table(comment = "密信用户信息")
public class PresetsecretRecord implements java.io.Serializable {

    @Id
    @Column(length = 64, comment = "操作用户id +'-' + 好友用户id +'-' + secretrecordid")
    private String presetsecretid = "";

    @Column(comment = "操作用户id")
    private int userid;

    @Column(updatable = false, comment = "创建时间")
    private long createtime;

    @Column(comment = "好友用户id")
    private int friendid;

    @Column(comment = "")
    private int secretrecordid;

    @Comment("好友关系")
    @Transient
    private FriendShip friendShip;
    
    @Transient
    private String secret;
    
    public String getSecret() {
		return secret;
	}

	public void setSecret(String secret) {
		this.secret = secret;
	}

	public FriendShip getFriendShip() {
		return friendShip;
	}

	public void setFriendShip(FriendShip friendShip) {
		this.friendShip = friendShip;
	}

	public void setPresetsecretid(String presetsecretid) {
        this.presetsecretid = presetsecretid;
    }

    public String getPresetsecretid() {
        return this.presetsecretid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public int getUserid() {
        return this.userid;
    }

    public void setCreatetime(long createtime) {
        this.createtime = createtime;
    }

    public long getCreatetime() {
        return this.createtime;
    }

    public void setFriendid(int friendid) {
        this.friendid = friendid;
    }

    public int getFriendid() {
        return this.friendid;
    }

    public void setSecretrecordid(int secretrecordid) {
        this.secretrecordid = secretrecordid;
    }

    public int getSecretrecordid() {
        return this.secretrecordid;
    }

    @Override
    public String toString() {
        return JsonConvert.root().convertTo(this);
    }
}
